{% extends "main.html" %}
{% block content %}
<script src="/swfobject.js" type="text/javascript"></script>
<script type="text/javascript">
  var flashvars = {
  };
  var params = {
    menu: "false",
    scale: "noScale",
    allowFullscreen: "true",
    allowScriptAccess: "always",
    bgcolor: "#FFFFFF"
  };
  var attributes = {
    id:"VideoListEdt",
    style:'border:1px solid #ADABB3;'
  };
  swfobject.embedSWF("/VideoListEdt.swf", "altContent", "400", "365", "9.0.0", "expressInstall.swf", flashvars, params, attributes);
  
  function articleSubmit()
  {
    var VideoListEdt = document.getElementById('VideoListEdt');
    var videolist = document.getElementById('videolist');
    videolist.value = VideoListEdt.getVideoListString();
  }
</script>
<h3 id='headline'>编辑视频:</h3>
<form id='postarticle' method='post' action='' onsubmit='articleSubmit();return true;'>
<label for="title">*标题:</label><input type='text' name='title' size='40' value='{{ article.title|escape }}'/>
<label>UP主:</label>{{ article.author.nickname|escape }}
<label for="classify">*分类:</label><select name='classify'>
<option value='0' {% ifequal article.classify 0 %}selected='selected' {% endifequal %}>动画</option>
<option value='1' {% ifequal article.classify 1 %}selected='selected' {% endifequal %}>音乐</option>
<option value='2' {% ifequal article.classify 2 %}selected='selected' {% endifequal %}>游戏</option>
<option value='3' {% ifequal article.classify 3 %}selected='selected' {% endifequal %}>娱乐</option>
<option value='4' {% ifequal article.classify 4 %}selected='selected' {% endifequal %}>番影</option>
</select>
<label for="tags">标签(空格隔开):</label><input type='text' name='tags' size='40' value='{{ article.tagstring|escape }}' />
<label for="abs">*简介:</label><textarea name='abs' rows='4' cols='50'>{{ article.abs|escape }}</textarea><br />
<script type='text/javascript' language='javascript'>
<!--
var videos = [];
function getVideoList()
{
  return videos;
}
function addVideo(title,type,arg,key)
{
  videos.push({'title':title,'type':type,'arg':arg,'key':key});
}
{% for v in videos %}
addVideo('{{ v.parttitle|addslashes }}','{{ v.typ }}','{{ v.vid|addslashes }}{{ v.fileurl|addslashes }}','{{ v.keyname }}');
{% endfor %}
//-->
</script>
<label for="VideoListEdt">视频:</label>
	<div id="altContent">
		<h1>您的浏览器不支持该Flash</h1>
		<p>请更新您的flash插件</p>
		<p><a href="http://www.adobe.com/go/getflashplayer"><img 
			src="http://www.adobe.com/images/shared/download_buttons/get_flash_player.gif" 
			alt="Get Adobe Flash player" /></a></p>
	</div>
<input type='hidden' name='videolist' id='videolist' value='' />
<div id='submit'>
<input type='submit' value='保存' />
</div>
</form>
{% endblock %}